package com.cc.visitor.controller;

import com.cc.alltype.ResponseResult;
import com.cc.visitor.dao.DepartmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chanchaw
 * @create 2024-09-26 13:39
 */
@CrossOrigin
@RestController
@RequestMapping("/department")
public class DepartmentController {
    @Autowired
    private DepartmentMapper dao;
    @PostMapping("/all")
    public ResponseResult getAll(){
        return ResponseResult.ok(dao.getAllDepartmentRestricted());
    }
}
